<?php
include_once "../soar/soar.inc";

function main()
{
    global $VIEW;

    $msg="Hello, no.1 line";
    errlog::write($msg);
    $VIEW[]=$msg;

    $msg="Hello, no.2 line";
    errlog::write($msg);
    $VIEW[]=$msg;

    $num=100;
    errlog::write("%s L.%d: There are %d items ",
            basename(__FILE__), __LINE__, $num);
    $msg=sprintf("%s L.%d: There are %d items",
            basename(__FILE__), __LINE__, $num);
    $VIEW[]=$msg;
}

$VIEW=array();
main();
?>
<html>
<body>
<?php
foreach($VIEW as $item)
{
    echo $item."<br/>\n";
}
?>
</body>
</html>
